package kr.saeildamil.androidStudy_second.brservice;

import java.util.Random;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;

public class LocalService extends Service {
	private final IBinder mBinder = new LocalBinder();
	private final Random mGen = new Random();
	
	class LocalBinder extends Binder{
		LocalService getService(){
			return LocalService.this;
		}
	}
	@Override
	public IBinder onBind(Intent intent) {
		return mBinder;
	}
	
	//Activity 가 호출하는 메소드
	public int getRandomNumber(){
		return mGen.nextInt(100);
		
	}
	

}
